header
 
Untitled Document
Course: CSC204
   
- Basic OS Theory
- OS – User View
- OS – System View
- DOS
- Linux
- Windows
1
 
Free Online Tutorial ::
To be a center of structured knowledge for all. All instructors are welcome to participate in this knowledge distribution.
 
 
Courses:CSC204
CSC204, 1.3 OS Booting Concepts
 
1.3.1 Understanding Booting Process
1.3.1.1 DOS Booting Sequence


1.3.1.2 Windows Booting Sequence


1.3.1.3 Linux Booting Sequence


BOOTING SEQUENCE

INDEX
 Introduction 3
 Bootstrapping 4
 The Master Boot Record 5
 Structure: Master Boot Record 6
 Boot Loader 7
 Types of Boot Loader 7
 NTLDR 8
 LILO 9
 GNU GRUB 9
 Steps in Booting 10
 Pre Booting Sequence 10
 Boot Sequence 11
 Initial Boot Loader Phase. 11
 Operating System Selection Phase. 12
 Hardware detection Phase. 12
 Configuration Selection Phase. 12
 Kernel Load Stage 13
 Kernel Initialization Stage 13
 Hardware Key Is Created 14
 Clone Control Set Is Created 14
 Device Drivers Are Loaded & Initialized14
 ErrorContol Value & Action 14
 Services Started 15
 Logon Stage 15
Flow Chart 16
 Reboot 17
 Shutdown 18
 Dual Booting 20
 Changing Boot Sequence 21
 References 22

INTRODUCTION:
Each time a computer boots up, it goes through an initial series of processes. This sequence of events is aptly named a "boot sequence." During the boot sequence, the computer activates the necessary hardware components and loads the appropriate software so that a user can interact with the machine. The boot sequence starts by accessing the the computer's BIOS on Windows PCs or the system ROM on a Macintosh. The BIOS and ROM contain basic instructions that tell the computer how to boot up. These instructions are then passed to the computer's CPU, which begins loading information into the system RAM. Once a valid boot disk or startup disk is found, the computer begins loading the operating system into the system memory. After the operating system finishes loading, the computer is ready to be used.

HISTORY:
The computer word boot is short for 'bootstrap' (short for 'bootstrap load'). The term bootstrap began as a metaphor derived from pull straps sewn onto the backs of leather boots with which a person could pull on their boots without outside help. In computers in the 1950s, pressing a bootstrap button caused a hardwired program to read a bootstrap program from a punched card and then execute the loaded boot program which loaded a larger system of programs from punched cards into memory, without further help from the human operator. In a computing context, that word has been used since at least 1958.
The GE 645 (c. 1965) had a 'BOOT' button– it could be that the contraction started as a way to label the button with fewer letters than the full word.
The Multics operating system (c. 1967) had a boot command. Multics documents also refer to 'boot tapes', but it is hard to determine exactly when that term was first used.
In the Unix operating system, the earliest reference for 'boot' is probably in The Unix Programmer's Manual, first edition 1971.11.03.
The bootstrap concept was used in the IBM 701 computer (1952-1956) which had a "load button" which initiated reading of the first 36-bit word from a punched card in a card reader, or from a magnetic tape unit, or drum unit (predecessor of the hard disk drive). The left 18-bit half-word was then executed as an instruction which read additional words into memory.

BOOTSTRAPPING:
Bootstrapping refers to a process where a simple system activates another more complicated system that serves the same purpose. The term is most often applied to the process of starting up a computer, in which a mechanism is needed to execute the software program that is responsible for executing software programs.
Booting: - Bootstrapping was shortened to booting, or the process of starting up any computer.
Software Bootstrapping: - Bootstrapping can also refer to the development of successively more complex, faster programming environments.
Compiler Bootstrapping: - In compiler design, a bootstrap or bootstrapping compiler is a compiler that is written in the target language, or a subset of the language, that it compiles.

MASTER BOOT RECORD:
When you turn on your PC, the processor attempts to begin the process of processing data. But, since the system memory is empty, the processor doesn't really have anything to execute, or even begin to know where to look for it. Every hard disk must have a consistent "starting point" where key information is stored about the disk, such as the number of partitions and what type they are. There also must be someplace where the BIOS can load the initial boot program that starts the process of loading the operating system. The place where this information is stored is called the master boot record (MBR).
Structure Of Master Boot Record:
Master Partition Table: This small bit of code that is referred to as a table contains a complete description of the partitions that are contained on the hard disk. Master Boot Code: The master boot record is the small bit of computer code that the BIOS loads and executes to start the boot process. This code, when fully executed, transfers control to the boot program stored on the boot (active) partition to load the operating system.

BOOT LOADER:
The computer's hardware alone cannot perform complex actions such as loading a program from disk, so an apparent paradox exists: to load the operating system into memory, Boot Loader’s only job is to load other software for the operating system to start. The boot loader would then read the operating system in from an outside storage medium such as paper tape, punched card, or a disk drive.A boot loader loads the operating system. When your machine loads its operating system, the BIOS reads the first 512 bytes of your bootable media which is known as the master boot record, or MBR. You can store the boot record of only one operating system in a single MBR.
Types of Boot Loader’s:
i. NTLDR
ii. LILO(Linux Loader)
iii. GNU GRUB

Abbreviation of NT Loader Used for Windows NT,including some of its later versions (2000/XP/Server 2003). NTLDR can be run from either portable storage (such as a CD-ROM, USB flash drive), floppy disk, or even the primary hard disk. NTLDR can also load a non NT-based operating system given the appropriate boot sector in a file. NTLDR requires, at the minimum, the following two files to be on the system volume:
1) NTLDR: which contains the main boot loader itself.
2) Boot.ini: which contains configuration options for a boot menu?

LILO(LInux LOader):
A versatile boot manager that supports:
 Choice of operating systems / kernels
 Boot time kernel parameters
 Booting non-Linux kernels
 A variety of configurations
Characteristics:
 Lives in MBR or partition boot sector
 Has no knowledge of file system structure so…
 Builds a sector “map file” (block map) to find kernel
/sbin/lilo – “map installer”
 Builds map file, boot sector
 Run after change to kernel or /etc/lilo.conf
GNU GRUB:
More recently, the GRand Unified Boot loader (commonly known as GRUB) seems to have somewhat taken the boot loaders crown from LILO. GNU GRUB is actively developed by the Free Software Foundation and based on the original GRUB program.

STEPS IN BOOTING:
The Boot process occurs in five stages:
 Pre-boot sequence
 Boot sequence
 Kernel load
 Kernel initialization
 Logon
1. Pre-boot sequence:
The computer runs power-on self test (POST) routines.The POST routines determine the amount of physical memory, the presence of hardware components, and so on. If the computer has a Plug and Play BIOS, enumeration and configuration of hardware devices occur at this stage. The computer BIOS locates the boot device and loads and runs the master boot record (MBR).
The MBR: 1.Scans the partition table to locate the active partition. 2.Loads the boot sector on the active partition into memory . 3.Executes the boot sector
The computer loads and initializes the NTLDR file, which is the operating system loader.
The first thing that the BIOS does when it boots the PC is to perform what is called the Power-On Self-Test, or POST for short. The POST is a built-in diagnostic program that checks your hardware to ensure that everything is present and functioning properly, before the BIOS begins the actual boot. It later continues with additional tests (such as the memory test that you see printed on the screen) as the boot process is proceeding.
The POST runs very quickly, and you will normally not even noticed that it is happening--unless it finds a problem (amazing how many things are like that, isn't it?) You may have encountered a PC that, when turned on, made beeping sounds and then stopped without booting

up. That is the POST telling you something is wrong with the machine. The speaker is used because this test happens so early on, that the video isn't even activated yet! These beep patterns can be used to diagnose many hardware problems with your PC.
2. Boot Sequence:
The second stage of the boot process is the boot sequence. After the computer loads NTLDR into memory, the boot sequence gathers information about hardware and drivers to prepare for the load phases.
The boot sequence has four phases:
i. Initial boot loader phase
ii. Operating system selection
iii. Hardware detection
iv. Configuration selection
v. Kernel Load
NTLDR switches the microprocessor from real mode to 32-bit flat memory mode, which NTLDR requires to carry out any additional functions. NTLDR starts the appropriate minifile system drivers, which Are built into NTLDR Enable NTLDR to find and load operating system from partitions formatted with file allocation table (FAT), FAT32, or NTFS file systems.
Initial Boot Loader Phase:
NTLDR switches the microprocessor from real mode to 32-bit flat memory mode, which NTLDR requires to carry out any additional functions. NTLDR starts the appropriate minifile system drivers, which
 Are built into NTLDR
 Enable NTLDR to find and load Windows XP Professional from partitions formatted with file allocation table (FAT), FAT32, or NT file system (NTFS)

Operating system selection:
During the boot sequence, NTLDR reads the BOOT.INI file. If more than one operating system selection is available in BOOT.INI, the Please Select The Operating System To Start screen appears. If no operating system is selected before the timer reaches zero, NTLDR loads the operating system specified by the default parameter in BOOT.INI. If there is only one entry in BOOT.INI, the default operating system is automatically loaded. If BOOT.INI is not present, NTLDR attempts to load Windows XP Professional from the first partition of the first disk, typically C:\.
Hardware Detection Phase:
NTDETECT.COM and NTOSKRNL.EXE perform hardware detection.NTDETECT.COM executes after you select the operating system on the Please Select The Operating System To Start screen (or after the timer times out).NTDETECT.COM collects a list of currently installed hardware components and returns this list to NTLDR.
NTDETECT.COM detects the following components:
i. Bus/adapter type
ii. Communication ports
iii. Floating-point coprocessor
iv. Floppy disks
v. Keyboard
vi. Mouse/pointing device
vii. Parallel ports
viii. SCSI adapters
ix. Video adapters
Configuration Selection Phase:
NTLDR does the following:
 Starts loading the operating system.
 Collects hardware information.
 Presents the Hardware Profile/Configuration Recovery menu .

The first hardware profile on the Hardware Profile/Configuration Recovery menu is highlighted.
 Press Enter to select the highlighted hardware profile.
 Press the down-pointing arrow key to select another profile.
 Press L to invoke the LastKnownGood configuration.
If there is only a single hardware profile on the menu, NTLDR
 Does not display the Hardware profile/Configuration Recovery menu.
 Loads the operating system using the default hardware profile configuration.
Kernel Load Stage
During the kernel load stage, NTLDR does the following:
 Loads NTOSKRNL.EXE but does not initialize it
 Loads the hardware abstraction layer file (HAL.DLL)
 Loads the HKEY_LOCAL_MACHINE\SYSTEM registry key from %systemroot%\System32\Config\System
 Selects the control set it will use to initialize the computer
 Loads device drivers with a value of 0x0 for the Start entry .
Kernel Initialization Stage
When the kernel load stage is complete, the kernel initializes, and NTLDR passes control to the kernel. The system displays a graphical screen with a status bar indicating load status.
Four tasks are accomplished during the kernel initialization stage:
I. The Hardware key is created.
II. The Clone control set is created.
III. Device drivers are loaded and initialized.
IV. Services are started.

The Hardware Key Is Created:-
On successful initialization, the kernel uses the data collected during hardware detection to create the registry key HKEY_LOCAL_MACHINE\HARDWARE The key contains information about
 Hardware components on the system board
 The interrupts used by specific hardware devices.
The Clone Control Set Is Created:-
The kernel creates the Clone control set by copying the control set referenced by the value of the Current entry in the HKEY_LOCAL_MACHINE\SYSTEM\Select sub key of the registry. The Clone control set is never modified because it is intended to be an identical copy of the data used to configure the computer and should not reflect changes made during the startup process.
Device Drivers Are Loaded and Initialized:-
After creating the Clone control set, the kernel initializes the low-level device drivers that were loaded during the kernel load stage. The kernel then scans the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services sub key of the registry for device drivers with a value of 0x1 for the Start entry. A device driver’s value for the Group entry specifies the order in which it loads. Device drivers initialize as soon as they load.
Errors Control Values And Action:
 If an error occurs, the boot process proceeds based on the value specified in the ErrorControl entry for the driver.
 ErrorControl Values and Action
 0x0 (Ignore): the boot sequence ignores the error and proceeds without displaying an error message.
 0x1 (Normal): the boot sequence displays an error message but ignores the error and proceeds.
 0x2 (Severe): the boot sequence fails and then restarts using the LastKnownGood control set.

If the boot sequence is currently using the LastKnownGood control set, it ignores the error and proceeds.
0x3 (Critical): the boot sequence fails and then restarts using the LastKnownGood control set. However, if the LastKnownGood control set is causing the critical error, the boot sequence stops and displays an error message. Error Control values appear in the registry under the sub key HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\Services\ name_of_service_or_driver\ErrorControl
Services Are Started.Session Manager (SMSS.EXE) does the following:
 Reads and executes the commands specified in the BootExecute data item before it loads any services
 Reads the Memory Management key and creates the paging file information required by the Virtual Memory Manager
 Reads the DOS Devices key and creates symbolic links that direct certain classes of commands to the correct component in the file system
 Reads the SubSystems key and starts the Win32 subsystem, which controls all input/output (I/O) and access to the video screen and starts the WinLogon process.
Logon Stage:
The logon process begins when kernel initialization ends. The Win32 subsystem automatically starts WINLOGON.EXE. WINLOGON.EXE starts the Local Security Authority (LSASS.EXE) and displays the Logon dialog box. The Service Controller executes and makes a final scan of the HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services sub key and starts the following services:
 All services with a start entry of 0x2
 Workstation service
 Server service
A operating system startup is not considered good until a user successfully logs on to the system.After a successful logon, the system copies the Clone control set to the LastKnownGood control set.

REBOOT:
Hard reboot: - A hard reboot is when power to a computer is cycled or a special reset signal to the processor is triggered. This restarts the computer without first performing any shut-down procedure.
Soft reboot: - A soft reboot is restarting a computer under software control, without removing power or triggering a reset line. It usually, though not always, refers to an orderly shutdown and restarting of the machine.
Random reboot: - Random reboot is a non-technical term referring to an unintended reboot for which the cause is not immediately evident to the user. Such reboots may occur due to a multitude of software and hardware problems, such as triple faults.

SHUTDOWN/BOOTING DOWN:
Any user issued command to the kernel to shutdown should result in a “graceful” termination of services.Prevent any further creation of user processes.Flush any pending I/O the kernel may be buffering.
Especially key for maintaining file integrity.The kernel process (idle) sends a terminate signal to all processes in the system.Remember: It is the overall parent!Hardware oriented shutdowns may not be as graceful CTRL-ALT-DEL or power switchThis is dependent on how the kernel handles the hardware interrupt. CTRL_ALT_DEL is often serviced as a regular shutdown user command.Power switch is often a “hard” shutdown!
Important to offer both hard and soft shutdown mechanisms to support user needs!

NETWORK BOOTING:
The central idea is that the computer has some bootstrap code in non-volatile memory, e.g. a ROM chip, that will allow it to contact a server and obtain system files over a network link. One goal is to avoid the use of a hard disk for booting. With network booting the files are held at a central server and can be updated at one location. Another goal is to use computers in locations where hard disks are not robust enough. Network booting often co-exists with disk booting. For example, a system could run Windows from disk but sometimes boot Linux from the network. In order to boot over the network, the computer must get An identity, An operating system image and Usually, a working file system.

DUAL BOOTING:
Step1: Defrag : -Before you can begin to reallocate the hard drive to multiply partitions, you have to run Microsoft Defrag to move all of your files to the front of the drive. This is the most important step to not losing files during a dual-boot creation.
Step2 : Restarting in Ranish :- Next, you need a program to edit the partition table, and that tool is ranish. Ranish does not work when running in Windows, so you need to make a DOS boot disk to run ranish in DOS. Copy the following to a disk.
command.com
IO.sys
scandisk.exe
part240.exe
Step3 : Starting ranish: - Once the computer comes up to the prompt, A:\ , type in “part240.exe ”.The GUI will load, and you can now edit the partition tables. If you areusing a single partition computer running windows, your only partition will be a FAT32 partition.
Step4 : Resizing: - using your arrow keys, select the partition you wish to resize, most likely it’s “Windows FAT32 LBA”. Now move over to the Ending columns, specifically “Cyl”.
Step5 : MBR resizing: - If you got an error message at the top of the screen, then you are doing it right. The error message means that you have successfully changed one of two partition tables. Now you can always discard the changes at this point if you messed up by hitting esc a few times.
Step6 : Done: - Almost. All you have to do is exit out of ranish and make sure it is saved. What about the linux partition? Well, from my own experience, it is better to leave unused space so linux can partition it how it likes instead of how you want it.
Closing : -Once you have finished the process to dual-boot your computer. you have to do is place the linux install disk in your CD drive and boot to it. If your computer can not boot from the CD drive, then you will have to make a boot disk.

CHANGING BOOT SEQUENCE:
Direct after the power-up sequence, your Com/PC is booting the Windows XP operating system from the internal hard disk drive (HDD). It is also possible to boot a second operating system (e.g. the SSV Embedded Gateway Linux) from a Compact Flash card in the Com/PC front panel.
Step 1: Restart your Com/PC and enter the BIOS Setup Utility. Then select the Boot item from main menu. Change the Boot Device Priority to the following values:
1st Boot Device the Compact Flash card
2nd Boot Device the internal HDD
Step 2: Select the Exit item from the main menu and save the current BIOS setup.
Step 3: Turn the Com/PC off and insert a bootable Compact Flash card into the Compact Flash socket. After the next power-up sequence, the Com/PC tries to boot an operating system directly from the Compact Flash card.

REFERENCES:
 http://dotnetjunkies.com/WebLog/unknownreference/articles/12284.aspx
 http://www.pctoday.com/Editorial/article.asp?article=articles/2004/t0206/06t06/06t06.asp&guid
 http://www.kernelthread.com/mac/osx/arch_boot.html
 http://www.cs.rpi.edu/~gerbal/BootX.pdf
 http://computer.howstuffworks.com/
 http://www. pcworld.com/
 http://www.google.co.in/
 http://www.wikipedia.org/
 
CSC204, 1.3 OS Booting Concepts
 
1.3.2 Multiple OS Booting Process
1.3.2.1 Windows Method


1.3.2.2 Non-Windows Method
 
 
 
 
 
Untitled Document
Unlimited calls
Click here

Law firm System
Klik sini
http://www.lawmais.com/secure/images/lawmais.png
Dakwah tanggugjawab kita
Nabi menangis mengenangkan umatnya. Kasihanilah mereka yang masih tidak dapat mengenal Allah. Bantulah mereka....



Tadarus Hafazan
Tadarus Hafazan Sudah bermula. Sila hubungi admin jika ingin menyertai. Yuran adalah percuma. Klik sini untuk maklumat lanjut


 
 
Untitled Document
Copyright © 2010 roslanjam@yahoo.com. All Rights Reserved.
Guest online: 1